package com.zhangh.summer.admin.controller.api;

import com.zhangh.summer.admin.biz.role.RoleBiz;
import com.zhangh.summer.admin.model.bo.DataBO;
import com.zhangh.summer.admin.model.po.AdRolePO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description: TODO
 * @author: zhanghui
 * @create: 2021-10-15 21:12
 **/
@RestController
@RequestMapping(value = "/roleApi",method = RequestMethod.POST)
public class RoleApiController {

    @Autowired
    private RoleBiz roleBiz;

    @RequestMapping("/dataList")
    public List<AdRolePO> dataList(@RequestBody DataBO query) {
        List<AdRolePO> list=this.roleBiz.getRoleDataList(query);
        return list;
    }

    @RequestMapping("/getUserRole")
    public List<AdRolePO> getUserRole(@RequestBody DataBO query) {
        List<AdRolePO> list=this.roleBiz.getUserRole(query);
        return list;
    }
}
